How VHS Data Forwarding Works

When a source VHS is configured to forward its data, it writes the new data to its database and to the forwarding queue. The data sent to the queue is compressed and stored as a pending forwarding message. Other updates are added to the pending message until the message reaches maximum size, at which time it is sent to the destination VHS.

The queue is maintained in memory and the data in the queue is written to a file (HistoryForwardQueue_[DDDD]SITE.SERVICE.dat) in the VHS folder when the service is shut down. The purpose of the file is to persist the queue data if the VHS is stopped. When the VHS is restarted, the information from the file is written to the queue and the data forwarding operations resume.

One of the configuration keywords for data forwarding is FORWARDING_INTERVAL. This keyword can be used to define a "send interval" for forwarding messages. The source VHS compresses data into forward messages. Once the message is full it is sent to the destination VHS. If the message is not full by the specified "send interval" it is sent anyway. When active, the forwarding message will be sent to the destination VHS once the message is full or when the send interval is met, whichever comes first. The interval options are: s=seconds, m=minutes, h=hours, or d=day.

If the source VHS cannot communicate with the destination VHS (for example, the network is down or the destination VHS is stopped), the forwarding message will remain in the queue and attempts will be made to resend the failed message until it is purged.

If a destination VHS is not running, the messages to be sent to that service are saved in the queue. Once the destination VHS resumes operation, the source VHS will begin sending the messages stored in its queue.

The VHS also has keywords for managing the size of its queue:

The maximum queue size and maximum queue time are set by the VHS configuration file parameters FORWARDING_MAX_BACKLOG and FORWARDING_QUEUE_EXPIRATION.

See VHS Data Forwarding Configuration Keywords for more information.